package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_idea")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IdeaModel {
    @TableId(value="id",type= IdType.AUTO)
    private Integer id;
    private String title;//标题
    private String content;//内容
    private String mobile;
    @TableField(exist = false)
    private String openid;
    @TableField(exist = false)
    private String faceUrl;
    //private int state;
    private int userId;
    @TableField(exist = false)
    private String userName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private LocalDateTime createTime;
    @TableField(exist = false)
    private Integer limit;
    @TableField(exist = false)
    private Integer page;
}
